package com.pine.sunshineelder.elderheath.vo;

import java.time.LocalDateTime;

import com.pine.sunshineelder.common.entity.ElderEntity;
import com.pine.sunshineelder.common.entity.ElderHealthEntity;
import com.pine.sunshineelder.common.entity.StaffEntity;

import lombok.Data;
@Data
public class ElderHealthQueryVo {
	private String doctorName;
	private String elderName;
	private String bodyCondition;
	private String content;
	private String elderDiet;
	private LocalDateTime checkTime;
	private LocalDateTime creatTime;
	public static ElderHealthQueryVo of(ElderHealthEntity eh) {
		ElderHealthQueryVo ehv=new ElderHealthQueryVo();
		ElderEntity e=eh.getElder();
		StaffEntity se=eh.getDoctor();
		ehv.setDoctorName(se.getName());
		ehv.setElderName(e.getName());
		ehv.setBodyCondition(eh.getBodyCondition());
		ehv.setContent(eh.getContent());
		ehv.setElderDiet(eh.getElderDiet());
		ehv.setCheckTime(eh.getCheckTime());
		ehv.setCreatTime(eh.getCreateTime());
		return ehv;
		
	}
	
}
